home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 February
/
EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso
/
enigma
/
onlypc
/
java
/
samples.bin
/
calculate.java
< prev
next >
Wrap
Text File
|
1996-09-04
|
1KB
|
57 lines
import java.awt.*;
public class calculate extends java.applet.Applet {
public void init() {
//{{INIT_CONTROLS
setLayout(null);
addNotify();
resize(284,153);
label1 = new java.awt.Label("Welcome to the Calculation Applet!",Label.CENTER);
label1.reshape(18,18,234,18);
add(label1);
SimpleCalcButton = new java.awt.Button("Simple Calculations");
SimpleCalcButton.reshape(66,54,144,24);
add(SimpleCalcButton);
LoanCalcButton = new java.awt.Button("Loan Calculations");
LoanCalcButton.reshape(66,90,144,24);
add(LoanCalcButton);
//}}
}
//{{DECLARE_CONTROLS
java.awt.Label label1;
java.awt.Button SimpleCalcButton;
java.awt.Button LoanCalcButton;
//}}
public void ShowCalculateFrame() {
CalculateFrame myNewFrame;
myNewFrame = new CalculateFrame();
myNewFrame.show();
}
public boolean handleEvent(Event event) {
if (event.id == Event.ACTION_EVENT && event.target == LoanCalcButton) {
ShowLoanCalc();
return true;
}
else
if (event.id == Event.ACTION_EVENT && event.target == SimpleCalcButton) {
ShowCalculateFrame();
return true;
}
return super.handleEvent(event);
}
public void ShowLoanCalc() {
LoanCalc myLoanCalc;
myLoanCalc = new LoanCalc();
myLoanCalc.show();
}
}